#@layout()
#define main()
<div class="jfa-header-box" id="jfa-header-box">
	<div class="jfa-crumbs" id="jfa-crumbs">
		<span>个人中心</span>
	</div>

	<div class="jfa-search-box"></div>
	#include("/_view/common/_header_right.html")
</div>


<div class="jfa-content-box" id="jfa-content-box">
	<div class="jfa-content" id="jfa-content">
		<input type="hidden" id="realNameInput" value="#(account.realName)" />
		<input type="hidden" id="userNameInput" value="#(account.userName)" />
		<input type="hidden" id="employeeNumberInput" value="#(account.employeeNumber)" />
		<form class="form-horizontal margin-top-30" id="accountForm" action="/account/updatePersonalInformation" method="post">
			<div class="form-group">
				<label class="col-sm-4 control-label">姓名</label>
				<div class="col-sm-8">
					<!--<input id="realNameInput" type="text" class="form-control" autocomplete="new-password" name="account.realName" value="#(account.realName??)">-->
					<span id="realNameSpan"></span>
				</div>
			</div>
			
			
			<div class="form-group">
				<label class="col-sm-4 control-label">账号</label>
				<div class="col-sm-8">
					<!--<input type="text" class="form-control" autocomplete="new-password" name="account.userName" value="#(account.userName??)">-->
					<span id="userNameSpan"></span>
				</div>
			</div>
			
			
			<div class="form-group">
				<label class="col-sm-4 control-label">员工号</label>
				<div class="col-sm-8">
					<!--<input type="text" class="form-control" autocomplete="off" name="account.employeeNumber" value="#(account.employeeNumber??)">-->
					<span id="employeeNumberSpan"></span>
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-4 control-label">密码</label>
				<div class="col-sm-8">
					<input id="password" type="password" class="form-control" autocomplete="new-password" name="password" placeholder="请输入密码"/>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-4 control-label">确认密码</label>
				<div class="col-sm-8">
					<input id="repassword" type="password" class="form-control" autocomplete="new-password" name="repassword" placeholder="请确认密码"/>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-4 col-sm-8">
					<input class="btn btn-primary" type="submit" value="提交" />
				</div>
			</div>
		</form>
	</div><!-- END OF jfa-content -->
</div><!-- END OF jfa-content-box -->

<style type="text/css">
	#accountForm {
		width: 500px;
	}

	.form-group {
		margin-bottom: 25px;
	}

	.jfa-content label {
		line-height: 1;
		vertical-align: baseline;
		color: #23527c;
		font-size: 20px;
		font-weight: normal;
		margin-bottom: 8px;;
	}
	.col-sm-8 span{
		font-size: 20px;
	}
</style>

<script type="text/javascript">
	$(document).ready(function() {
		$("#accountForm").ajaxForm({
			dataType: "json"
			, beforeSubmit: function(formData, jqForm, options) {}
			, success: function(ret) {
				if (ret.state == "ok") {
					// location.href = "/account";
                    showOkMsg("修改成功");
				} else {
				    $("#password").val("");
				    $("#repassword").val("");
					showFailMsg(ret.msg);
				}
			}
			, error: function(ret) {alert(ret.statusText);}
			, complete: function(ret) {} 	      // 无论是 success 还是 error，最终都会被回调
		});
		$("#realNameSpan").html($("#realNameInput").val());
        $("#userNameSpan").html($("#userNameInput").val());
        $("#employeeNumberSpan").html($("#employeeNumberInput").val());
	});
</script>
#end